<?php
namespace app\common\model;

use think\Model;

class OnlineUsers extends Model
{
    protected $dateFormat = false;

    public function saveUser($data){
        $data['visit'] = serialize([time()]);
        $result = $this->allowField(true)->insertGetId($data);
        return $result;
    }
}